<#setting number_format=",###.###">
<#setting classic_compatible="true">
<style id="printStyle">

#pageHead,#printHead,#tableArea,#remark,#printFooter,#contractContent,#pageFooter,pre{
    font-family: Times New Roman,DFPBiaoKaiShu-B5,KaiTi_GB2312,'楷体';
    font-size: 13px;
    line-height: 22px;
}

pre { 
    white-space: pre-wrap; /* css-3 */ 
    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ 
    white-space: -pre-wrap; /* Opera 4-6 */ 
    white-space: -o-pre-wrap; /* Opera 7 */ 
    word-wrap: break-word; /* Internet Explorer 5.5+ */ 
} 

td,tr,talbe {
    margin: 0;
    padding: 0;
}

div{
    word-break:break-strict;
}

table {
    border-spacing: 0;
    border-spacing: 0 !important;
    *border-collapse: expression('separate', cellSpacing =   '0px');
    border-spacing: expression(this.cellSpacing = 0);
    table-layout:fixed; 
    word-break:break-strict; 
}

td,th {
    display: table-cell;
    vertical-align: inherit;
}

table th,table td {
    text-align: left;
    line-height: 25px;
}

.printTable {
    width: 100%;
    margin: 0;
    padding: 0;
}

.printTable td {
    line-height: 25px;
    word-wrap:break-word;
    word-break:break-all;
}

.printTable tr {
    width: 100%;
}
.printTable td{
    font-weight: bold;
    border: 1px solid gray;
}
.printLine td{
    text-align: center;
}
</style>
<div id="pageHead" style="width: 740px;">
    <div style="width: 180px;float: left;">
            <img alt="" src="${staticDomain}images/system/logo/${entity.company.logo}" width="180"/>
        </div>
    <div style="line-height: 30px; font-size:1.9em; font-weight: bolder; text-align: center;width: 360px;float: left;margin-top: 15px;">生产定单合同</div>
</div>
<div id="printHead"  style="width: 700px;">
    <div style="float: left;width: 700px;">
        <table border="0" cellspacing="0" cellpadding="0" width="98%" style="margin-top:15px;">
            <tbody> 
                <tr>
                    <td width="10%">甲&#160;&#160;方：</td>
                    <td width="53%" style="border-bottom: 1px solid black;">${entity.supplier.name }</td>
                    <td width="5%"></td>
                    <td width="12%">合同编号：</td>
                    <td width="20%">${entity.purchaseNo}</td>
                </tr>
                <tr>
                    <td width="10%">地&#160;&#160;址：</td>
                    <td width="53%">${entity.supplier.address }</td>
                    <td width="5%"></td>
                    <td width="12%">签订日期：</td>
                    <td width="20%">${entity.purchaseDate?string("yyyy-MM-dd")}</td>
                </tr>
                <tr>
                    <td width="10%">电&#160;&#160;话：</td>
                    <td colspan="4">${entity.supplier.linkTelephone }</td>
                </tr>
                <tr>
                    <td width="10%">联系人：</td>
                    <td colspan="4">${entity.supplier.linkPerson}</td>
                </tr>
            </tbody>
        </table>
        <table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:15px;">
            <tbody> 
                <tr>
                    <td width="10%">乙&#160;&#160;方：</td>
                    <td width="53%" style="border-bottom: 1px solid black;">${entity.company.name }</td>
                    <td width="37%">&#160;</td>
                </tr>
                <tr>
                    <td width="10%">地&#160;&#160;址：</td>
                    <td colspan="2">${entity.company.address }</td>
                </tr>
                <tr>
                    <td width="10%">电&#160;&#160;话：</td>
                    <td colspan="2">${entity.company.linkTelephone }</td>
                </tr>
                <tr>
                    <td width="10%">联系人：</td>
                    <td colspan="2">${entity.company.linkPerson}</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div id="tableArea">
    <div style="float: left;width: 700px;">
        <table class="printTable" style="margin-top: 15px;">
            <caption style="text-align: left;">
                <div style="line-height: 30px;margin-top:15px" align="left">&#160;&#160;&#160;&#160;甲/乙双方经协商同意按下列条款签订本合同，未经双方同意任何一方不得擅自更改本合同条款，否则毁约方须赔偿对方一切经济损失。</div>       
                <div style="margin: 5px 0 10px 5px;width: 100%;">一、大货生产前要求：</div>
            </caption>
            <thead>
                <tr class="printLine">
                    <td width="15%">工程单号</td>
                    <td width="20%">规格</td>
                    <td width="20%">颜色</td>
                    <td width="15%">数量</td>
                    <td width="5%">单位</td>
                    <td width="12%">单价</td>
                    <td width="13%">总价</td>
                </tr>
            </thead>
            <tbody>
                <#list orderItems as item>
                <tr>
                    <td style="text-align: left;">${item.customerPurchaseNo }</td>
                    <td style="text-align: left;">${item.englishName }</td>
                    <td style="text-align: left;">${item.name }</td>
                    <td style="text-align: left;">${item.quantity }</td>
                    <td style="text-align: left;">${item.unitName }</td>
                    <td style="text-align: left;">${item.unitPrice}</td>
                    <td style="text-align: left;">${item.quantity * item.unitPrice}</td>
                </tr>
                </#list>
                <tr class="printLine">
                    <td colspan="7" style="text-align: right;">合计:${currency}${entity.total}</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div id="contractContent">
    <div style="float: left;width: 700px;">
      <div style="text-align: left;margin-top: 5px;">
            <div style="min-height: 50px;">
                        二、备注：<br/> ${entity.remark}
            </div>
            <div style="min-height: 50px;">
                        三、付款方式：  <br/>${entity.payment}
            </div>
            <div>
                     四、大货交货时间：${entity.delivaryDate?string("yyyy-MM-dd")}<br>
                              大货交货地点：${entity.delivaryAddress }
            </div>
            <div>
                      五、详细生产规格：  <br/><pre style="margin: 0;">${entity.specification }</pre>
            </div>
            <div style="min-height: 50px;">
                        六、质量要求： <br/>${entity.quality }
            </div>
            <div style="min-height: 50px;">
                        七、包装：<br/> ${entity.packing }
            </div>
            <div style="min-height: 50px;">
                        八、出货： <br/>${entity.shipping }
            </div>
            <div style="min-height: 60px;">
                       九、合同条款：<br/>
                <p>1)甲方应严格按照合同约定的时间保质保量的进行生产加工。如出现质量问题或生产时间拖迟所造成乙方被客户扣款/罚款，由甲方负责/承担。</p>
                <p>2)甲方需在走货后70天内开出17%增值税给乙方。</p>
                <p>3)本合同一式两份。双方各一份。如在履行过程中发生的争议，由双方当事人协商解决；也可由当地工商行政管理部门调解；协议调解不成的，根据相关法律条款解决。</p>
            </div>
            <div style="margin:15px 0 0 5px;width: 100%;text-align: left;">
                  <table border="0" cellspacing="0" cellpadding="0" width="100%">
                      <tr>
                          <td width="7%">甲方：</td>
                          <td width="43%">${entity.supplier.name }</td>
                          <td width="7%">乙方：</td>
                          <td width="43%">${entity.company.name }</td>
                      </tr>
                      <tr>
                          <td>签章：</td>
                          <td>${entity.supplier.linkPerson }</td>
                          <td>签章：</td>
                          <td>${entity.company.linkPerson }</td>
                      </tr>
                      <tr>
                          <td>电话：</td>
                          <td>${entity.supplier.linkTelephone }</td>
                          <td>电话：</td>
                          <td>${entity.company.linkTelephone }</td>
                      </tr>
                      <tr>
                          <td>地址：</td>
                          <td>${entity.supplier.address }</td>
                          <td>地址：</td>
                          <td>${entity.company.address }</td>
                      </tr>
                  </table>
                  <div style="float: left;width: 100%;">
                      <div style="margin: -110px 0 0 450px; float: left;">
                          <img border="0" transcolor="#FFFFFF"
                              src="${staticDomain}images/system/company/${entity.company.officialSeal}"
                              style="z-index: -1;" />
                      </div>
                  </div>
            </div>
            <div style="margin:15px 0 0 0;height: 30px;">
                <table width="100%">
                    <tr>
                        <td width="20%">开单人签名：</td>
                        <td width="30%">
                            <#if maker.remark!="">
                                <img src="${staticDomain}images/system/personal/${maker.remark}" transcolor="#FFFFFF" style="z-index: -1;">
                            <#else>
                                ${maker.userName}
                            </#if>
                        </td>
                        <td width="20%">审核人签名：</td>
                        <td width="30%">
                            <#if auditor??>
                            <#if auditor.remark!="">
                                <img src="${staticDomain}images/system/personal/${auditor.remark}" transcolor="#FFFFFF" style="z-index: -1;">
                            <#else>
                                ${auditor.userName}
                            </#if>
                            </#if>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
